package com.herench.bunch.emr.handler;

import com.herench.bunch.commons.annotation.Handler;
import com.herench.bunch.commons.support.AbstractMessageHandler;
import com.herench.bunch.emr.agent.EmrAgent;
import com.herench.bunch.emr.convert.BedDictConvert;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;
import java.util.Map;

/**
 * @author chentong on 19-03-22 上午10:30
 * @email chentong@herench.com
 */


@Handler(code = "600030", name = "床位字典" ,messageConvertClass = BedDictConvert.class)
public class BedDictHandler extends AbstractMessageHandler {

    @Autowired
    private EmrAgent emrAgent;

    @Override
    protected Object proxyInvoke(Object inMessage) throws Exception {
//        Map<String,Object> params = (Map<String, Object>) inMessage;
        List<Map<String,Object>> paramList = emrAgent.queryBedDict();
        return paramList;
    }
}
